package com.huiyujiaoyu.powertime.ui.my;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.huiyujiaoyu.base.BaseActivity;
import com.huiyujiaoyu.base.WebViewActivity;
import com.huiyujiaoyu.powertime.R;
import com.huiyujiaoyu.util.ActivityUtil;
import com.huiyujiaoyu.util.AppUtil;
import com.huiyujiaoyu.util.Constant;
import com.huiyujiaoyu.widget.LlkjToolBar;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by win7 on 2017/6/18.
 * 我的收藏
 */

public class SettingActivity extends BaseActivity {
    @BindView(R.id.toolbar)
    LlkjToolBar mToolbar;
    @BindView(R.id.tv_weibo)
    TextView mTvWeibo;
    @BindView(R.id.rl_clean)
    RelativeLayout mRlClean;
    @BindView(R.id.tv_version)
    TextView mTvVersion;
    @BindView(R.id.rl_version)
    RelativeLayout mRlVersion;
    @BindView(R.id.btn_exit)
    Button mBtnExit;

    public static void launch(Context context) {
        ActivityUtil.startActivity(context, SettingActivity.class);
    }

    @Override
    protected void initView() {
        super.initView();
        setToolbar(mToolbar);
        mToolbar.setToolBar("设置", true, "", R.mipmap.icon_titlebar_back, false, "", LlkjToolBar.isNull);
    }

    @Override
    protected void initListener() {
        super.initListener();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_setting;
    }


    @OnClick({R.id.rl_clean, R.id.rl_version, R.id.rl_guanyu, R.id.rl_yijian, R.id.btn_exit})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.rl_clean:
                break;
            case R.id.rl_version:
                break;
            case R.id.rl_guanyu:
                WebViewActivity.startActivity(mContext,"关于我们",String.format(Constant.ABOUT_US, AppUtil.getCurrentVersion(mContext).versionName),1);
                break;
            case R.id.rl_yijian:
                FeedBackActivity.launch(mContext);
                break;
            case R.id.btn_exit:
                break;
        }
    }
}
